import Vue from 'vue'
import Vuex from 'vuex'
import createPersistedState from 'vuex-persistedstate'
Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    // 是否登录
    isLogin: false
    // 用户信息
  },
  mutations: {
    // 点击登录改变登录状态
    login_change(state, val) {
      state.isLogin = val
    }
  },
  actions: {},
  modules: {},
  plugins: [createPersistedState({ storage: window.localStorage })]
})
